package com.hqyj.onlineExamination.modules.exam.controller;

import com.github.pagehelper.PageInfo;
import com.hqyj.onlineExamination.modules.common.entity.SearchBean;
import com.hqyj.onlineExamination.modules.exam.entity.Achievement;
import com.hqyj.onlineExamination.modules.exam.entity.Question;
import com.hqyj.onlineExamination.modules.exam.service.CorrectService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author yun
 * @date 2021-6-10 15:00
 * 未批改的试卷列表
 */
@RestController
@RequestMapping("/api")
public class CorrectController {

    @Autowired
    private CorrectService correctPagerService;

    /**
     * 127.0.0.1/api/corrects ---- post
     * {"currentPage":"1","pageSize":"5","orderBy":"id","direction":"desc","keyWord":""}
     */
    @PostMapping(value = "/corrects", consumes = "application/json")
    public PageInfo<Achievement> selectAllCorrect(@RequestBody SearchBean searchBean) {
        return correctPagerService.selectAllCorrect(searchBean);
    }
}
